package com.yh.eval;

import android.os.Bundle;
import android.view.View;
import android.widget.ListView;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.ViewSwitcher;

import androidx.appcompat.app.AppCompatActivity;

import org.w3c.dom.Text;

/**
 * 营收数据查询
 */
public class SeeIncomeActivity extends AppCompatActivity {

    private ViewSwitcher mViewSwitcher;
    private ListView mListView;
    private RadioGroup mRadioGroup;
    private TextView mStartTime, mEndTime;
    private TextView mTtMile, mTtTime, mTtAmount;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_see_income);
        mViewSwitcher = findViewById(R.id.viewSwitcher);
        mRadioGroup = findViewById(R.id.radioSwitch);
        mRadioGroup.setOnCheckedChangeListener((group, checkedId) -> {
            if (checkedId == R.id.rdbAll){
                mViewSwitcher.showPrevious();
            }else {
                mViewSwitcher.showNext();
            }
            mViewSwitcher.setInAnimation(this, android.R.anim.fade_in);
            mViewSwitcher.setOutAnimation(this, android.R.anim.fade_out);
        });
    }

    public void onClick(View v){
        switch (v.getId()){
            case R.id.btnBack:
                finish();
                break;

        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        hideSystemUI();
    }

    private void hideSystemUI() {
        View decorView = getWindow().getDecorView();
        decorView.setSystemUiVisibility(
                View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_FULLSCREEN
                        | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
    }

}
